package com.uenpay.util.json;

import com.google.gson.Gson;

public class JsonMananger {
    private static Gson mGson;
    private static final JsonMananger INSTANCE = new JsonMananger();

    public static synchronized JsonMananger getInstance() {
        return INSTANCE;
    }

    private JsonMananger() {
        mGson = new Gson();
    }

    public <T> T jsonToBean(String json, Class<T> cls) {
        return mGson.fromJson(json, cls);
    }

    public String beanToJson(Object obj) {
        return mGson.toJson(obj);
    }


}
